<template>
  <div class="news_comments">
    <van-nav-bar
      title="我的评价"
      left-arrow
      @click-left="$router.go(-1)"
    />
    <div
      class="list"
      v-for="(item,index) of orderCommentVoList"
      :key="index"
    >
      <ul>
        <li class="one-row">
          <div>
            <img
              class="tx"
              :src="item.customerHandImage"
            >
          </div>
          <div class="one-row-bottom">
            <p class="name">{{item.customerNickName}}</p>
            <p class="time">{{item.orderCommentApplicationTime}}</p>
          </div>
        </li>
        <li class="two-row">
          <p>{{item.orderCommentContent}}</p>
        </li>
        <li class="three-row" v-for="pic in item.orderCommentPictureList">
          <img
            class="three-img"
            :src="pic.orderCommentPictureUrl"
          >
        </li>
        <li class="four-row">
          <div class="four-left">
            <img :src="item.picUrl">
          </div>
          <div class="four-right">
            <p class="spxq">{{item.labelName}},{{item.labelUnit}}</p>
            <p class="price">￥{{item.paymentMoney}}<span v-if="item.orderCommentLevel<3" style="font-size: 14px;margin-left: 5px;color: #fb5d63">已差评</span></p>
          </div>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
  import { orderCommentVoByNull } from '@/api/commodity/order_master.js';
    export default {
        name: "MyComment",
      data(){
        return{
          //用户人全部的评价
          orderCommentVo:{},
          //全部评价的集合
          orderCommentVoList:[],

        }
      },
      created() {
          this.getSelectOrderCommentVo();
      },
      methods:{
          //查询全部的评价
        getSelectOrderCommentVo(){
          orderCommentVoByNull(this.orderCommentVo).then((res)=>{
            if (res.data.code==200){
              this.orderCommentVoList = res.data.data;
            }else {
              console.log('123456789');
            }
            console.log(res);
          })
        },


      },
    }
</script>

<style scoped>
  .news_comments {
    height: 100%;
    background-color: #f4f4f4;
  }

  .price {
    color: rgba(16, 16, 16, 100);
    font-size: 16px;
    text-align: left;
    margin-top: 5vw;
    font-family: SourceHanSansSC-bold;
  }

  .four-right {
    margin-left: 8px;
  }

  .spxq {
    color: rgba(91, 91, 91, 100);
    font-size: 12px;
    text-align: left;
    font-family: PingFangSC-regular;
    -webkit-line-clamp: 3;
  }

  .four-row {
    margin: 10px 0;
    display: flex;
    align-items: unset;
  }

  .four-left img {
    width: 24vw;
    height: 24vw;
  }

  .three-img {
    margin-left: 2%;
  }

  .three-row img {
    margin-top: 3%;
  }

  .three-row {
    display: flex;
  }

  .three-row img {
    width: 24vw;
  }

  p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  .two-row {
    margin-top: 8px;
    color: rgba(91, 91, 91, 100);
    font-size: 13px;
    text-align: left;
    font-family: PingFangSC-regular;
  }

  .one-row-bottom {
    margin-left: 8px;
  }

  .list {
    width: 100%;
    overflow: hidden;
    padding: 10px 15px;
    box-sizing: border-box;
    background-color: #ffffff;
    margin: 10px 0;
  }

  .tx {
    width: 10vw;
    height: 10vw;
    border-radius: 50%;
  }

  .one-row {
    display: flex;
  }

  .name {
    color: rgba(104, 104, 103, 100);
    font-size: 14px;
    text-align: left;
    font-family: PingFangSC-regular;
  }

  .time {
    color: rgba(151, 149, 149, 100);
    font-size: 12px;
    text-align: left;
    font-family: SourceHanSansSC-regular;
  }
</style>
